package design.TemplateMethod;

/**
 * Created by looper on 2017/8/18.
 */
public class TemplateTest {
  public static void main(String[] args) {
    //通过选择不同的子类来实现同一个算法框架不同的定义

    //上海玩的实现子类
    SpendHoliday spendHoliday = new PlayInShanghai();
    spendHoliday.templateMethod();

    System.out.println();

    //苏州玩的实现子类
    spendHoliday = new PlayInShuzhou();
    spendHoliday.templateMethod();
  }
}
